﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class SumUtils
    {
        public int Img(int a, int b)
        {

            int sum = a + b;
            Console.WriteLine("相加后的结果是" + sum);
            return sum;
        }
        public double Img(double a, double b)
        {

            double sum = sum = a + b;
            Console.WriteLine("相加后的结果是" + sum);
            return sum;
        }
        public string Img(string a, string b)
        {
            string sum = sum = a + b;
            Console.WriteLine("相加后的结果是" + sum);
            return sum;
        }
        public int Img(int a)
        {

            int sum = 0;
            for (int i = 1; i <= a; i++)
            {
                sum = sum + i;
            }
            Console.WriteLine("相加后的结果是" + sum);
            return sum;

        }
    }
}